import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './assets/globl.css'
import './assets/fonts/iconfont.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//配置axios
import axios from 'axios'
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/'
axios.interceptors.request.use(config => {
    console.log(config)
    config.headers.Authorization = window.sessionStorage.getItem('token')
        //在最后必须 return config
    return config
})
Vue.prototype.$http = axios

Vue.use(ElementUI);
Vue.config.productionTip = false

new Vue({
    router,
    render: h => h(App)
}).$mount('#app')